package com.web.cms.ad.message;

import com.blue.core.dict.State;
import com.blue.validation.group.SaveModel;
import com.blue.validation.group.UpdateModel;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 广告请求内容
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年11月13日
 */
 public class AdvRequest implements Serializable
{
	private static final long serialVersionUID = 1L;
	
	@NotNull(groups = { UpdateModel.class }, message = "编号不能为空")
	@Null(groups={SaveModel.class}, message="编号必须为空")
	private Integer id; // 编号
	@NotNull(groups = { SaveModel.class }, message = "网站编号不能为空")
	private Integer webId; // 网站编号
	@NotNull(groups = { SaveModel.class }, message = "位置编号不能为空")
	private Integer posId; // 位置编号
	@NotBlank(groups = { SaveModel.class }, message = "名称不能为空")
	@Size(min = 0, max = 50, groups = { SaveModel.class, UpdateModel.class }, message = "名称长度[0-50]")
	private String name; // 名称
	@NotBlank(groups = { SaveModel.class }, message = "内容不能为空")
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "内容长度[0-500]")
	private String content; // 内容
	@Size(min = 0, max = 200, groups = { SaveModel.class, UpdateModel.class }, message = "链接长度[0-200]")
	private String url; // 链接
	@Size(min = 0, max = 500, groups = { SaveModel.class, UpdateModel.class }, message = "描述长度[0-500]")
	private String descp; // 描述
	private Date startTime; // 开始生效时间
	private Date endTime; // 结束生效时间
	private Date createTime; // 创建时间
	private Integer clicks; // 点击次数
	private State state; // 状态：0正常，1作废
	private Integer sort; // 排序
	
	public AdvRequest()
	{
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getWebId()
	{
		return this.webId;
	}
	
	public void setWebId(Integer webId)
	{
		this.webId = webId;
	}
	
	public Integer getPosId()
	{
		return this.posId;
	}
	
	public void setPosId(Integer posId)
	{
		this.posId = posId;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getContent()
	{
		return this.content;
	}
	
	public void setContent(String content)
	{
		this.content = content;
	}
	
	public String getUrl()
	{
		return this.url;
	}
	
	public void setUrl(String url)
	{
		this.url = url;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}
	
	public Date getStartTime()
	{
		return this.startTime;
	}
	
	public void setStartTime(Date startTime)
	{
		this.startTime = startTime;
	}
	
	public Date getEndTime()
	{
		return this.endTime;
	}
	
	public void setEndTime(Date endTime)
	{
		this.endTime = endTime;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public Integer getClicks()
	{
		return this.clicks;
	}
	
	public void setClicks(Integer clicks)
	{
		this.clicks = clicks;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
	public Integer getSort()
	{
		return this.sort;
	}
	
	public void setSort(Integer sort)
	{
		this.sort = sort;
	}
	
}
